package com.yidao.organization.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.yidao.organization.service.CompanyService;

@Controller
public class CompanyController {
	
	@Autowired
	private CompanyService companyService;
	
	public CompanyService getCompanyService() {
		return companyService;
	}

	public void setCompanyService(CompanyService companyService) {
		this.companyService = companyService;
	}

	@RequestMapping("/company/list.do")
	public ModelAndView list(){
		ModelAndView mv = new ModelAndView();
		mv.setViewName("/customer/list");
		mv.addObject("companys",companyService.listAll());
		return mv;
	}
}
